﻿using System;

namespace Observer
{
    class Program
    {
        static void Main(string[] args)
        {
            ConcreteSubject s = new ConcreteSubject();

            s.Attach(new ConcreteObserver(s, "A"));
            s.Attach(new ConcreteObserver(s, "B"));

            s.SubjectState = "XXX";
            s.Notify();

            Console.Read();
        }
    }
}
